/**
 * Interview Http Request
 * 面试通知 Http 请求
 *
 * @date 2020-08-24
 * @author 逗号米
 */

import * as http from '@/http'
import * as api from '@/api/cms/company/interview'

/**
 * 首页
 *
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const index = (params?: any): Promise<any> => http.get(api.index, params)

/**
 * 查询
 *
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const query = (params?: any): Promise<any> => http.get(api.query, params)

/**
 * 显示
 *
 * @params {Number} id 主键
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const show = (id: number, params?: any): Promise<any> => http.get(api.show(id), params)

/**
 * 删除
 *
 * @params {Number} id 主键
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const destroy = (id: number, params?: any): Promise<any> => http.del(api.destroy(id), params)

/**
 * 按企业用户查询面试记录
 *
 * @params {Number} uid
 * @params {Object} [params]
 * @return {Promise<any>}
 */
export const getCompanyUserInterview = (uid: number, params?: any): Promise<any> => {
  return http.get(api.getCompanyUserInterview(uid), params)
}

/**
 * 按招聘职位查询面试记录
 *
 * @params {Number} uid
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
 export const getCompanyJobInterview = (id: number, params?: any): Promise<any> => {
  return http.get(api.getCompanyJobInterview(id), params)
}


/**
 * 按个人用户查询面试记录
 *
 * @params {Number} uid
 * @params {Object} [params]
 * @return {Promise<any>}
 */
export const getPersonalUserReceiveInterview = (uid: number, params?: any): Promise<any> => {
  return http.get(api.getPersonalUserReceiveInterview(uid), params)
}

/**
 * 按招聘职位查询面试记录
 *
 * @params {Number} id
 * @params {Object} [params]
 * @return {Promise<any>}
 */
export const getPersonalResumeReceiveInterview = (id: number, params?: any): Promise<any> => {
  return http.get(api.getPersonalResumeReceiveInterview(id), params)
}


// /**
//  * 按简历查询面试通知
//  *
//  * @params {Number} resumeId 简历 id
//  * @params {Object} [params] 参数
//  * @return {Promise<any>}
//  */
// export const resumeReceivedInterview = (resumeId: number, params?: any): Promise<any> => {
//   return http.get(api.resumeReceivedInterview(resumeId), params)
// }
//
// /**
//  * 个人用户收到面试通知
//  *
//  * @params {Number} uid 用户 uid
//  * @params {Object} [params] 参数
//  * @return {Promise<any>}
//  */
// export const personalUserReceivedInterview = (uid: number, params?: any): Promise<any> => {
//   return http.get(api.personalUserReceivedInterview(uid), params)
// }